<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Hard
  </div>
  <div>
   <h1 class="question_title">
    41. First Missing Positive
   </h1>
   <p>
    Given an unsorted integer array, find the smallest missing&nbsp;positive integer.
   </p>
   <p>
    <strong>
     Example 1:
    </strong>
   </p>
   <pre>
Input: [1,2,0]
Output: 3
</pre>
   <p>
    <strong>
     Example 2:
    </strong>
   </p>
   <pre>
Input: [3,4,-1,1]
Output: 2
</pre>
   <p>
    <strong>
     Example 3:
    </strong>
   </p>
   <pre>
Input: [7,8,9,11,12]
Output: 1
</pre>
   <p>
    <strong>
     Note:
    </strong>
   </p>
   <p>
    Your algorithm should run in
    <em>
     O
    </em>
    (
    <em>
     n
    </em>
    ) time and uses constant extra space.
   </p>
  </div>
  <div>
   <h1 class="question_title">
    41. 缺失的第一个正数
   </h1>
   <p>
    给定一个未排序的整数数组，找出其中没有出现的最小的正整数。
   </p>
   <p>
    <strong>
     示例&nbsp;1:
    </strong>
   </p>
   <pre>输入: [1,2,0]
输出: 3
</pre>
   <p>
    <strong>
     示例&nbsp;2:
    </strong>
   </p>
   <pre>输入: [3,4,-1,1]
输出: 2
</pre>
   <p>
    <strong>
     示例&nbsp;3:
    </strong>
   </p>
   <pre>输入: [7,8,9,11,12]
输出: 1
</pre>
   <p>
    <strong>
     说明:
    </strong>
   </p>
   <p>
    你的算法的时间复杂度应为O(
    <em>
     n
    </em>
    )，并且只能使用常数级别的空间。
   </p>
  </div>
 </body>
</html>